import pymysql


con = pymysql.connect( host="localhost",
                        user="root",
                        passwd="123456",
                        database = "test")

cur = con.cursor()
data = cur.execute('select * from tb_user')
oneDate = cur.fetchone()
print(f'{oneDate[0]},{oneDate[1]}')

for i in cur.fetchall():
    print(i)

print(cur.lastrowid)
cur.close()
con.close()
